﻿
@model ShoppingCartModel
@using Nop.Core.Domain.Orders;
@using Nop.Web.Models.ShoppingCart;

<div class="order-summary @if (Model.IsEditable) {<text>editable</text>}">
    @Html.Widget("order_summary_content_before")

    @if (Model.AllItems.Count > 0)
    {
        if (Model.Warnings.Count > 0)
        {
            <div class="message-error">
                <ul>
                    @for (int i = 0; i < Model.Warnings.Count; i++)
                    {
                        <li>@Model.Warnings[i]</li>
                    }
                </ul>
            </div>
        }
        if (Model.AllItems.Count > 0)
        {
            <div data-storeid="0">
                <table class="cart-store-items">
                    <thead>
                        <tr><th>Products</th><th></th><th>Unit Price</th><th>Qty</th><th>Total</th>@if (Model.AllItems.Where(i => i.IsEditable == true).Count() > 0)
                        {
                        <th>Remove</th>}</tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model.AllItems)
                        {
                            @Html.Partial("_CartItem", item);
                        }
                    </tbody>
                </table>
            </div>
        }
    }

    @Html.Widget("order_summary_content_after")
    <div class="clear"></div>
</div>
